//
//  LabTFView.m
//  PlayerWorld
//
//  Created by 汪的一声就哭了！ on 16/8/15.
//  Copyright © 2016年 刘成. All rights reserved.
//

#import "LabTFView.h"

@implementation LabTFView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.label = [[UILabel alloc] init];
        [self addSubview:self.label];
        self.label.textAlignment = NSTextAlignmentRight;
        self.label.font = [UIFont systemFontOfSize:15];
        
        self.textField = [[UITextField alloc] init];
        [self addSubview:self.textField];
        self.textField.borderStyle = UITextBorderStyleRoundedRect;
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.label.frame = CGRectMake(0, 0, self.bounds.size.width/4, self.bounds.size.height);
    self.textField.frame = CGRectMake(self.bounds.size.width/4+10, 0, self.bounds.size.width*3/4-20, self.bounds.size.height);
}
@end
